from Rk.zk9_29.Base import Base
from selenium.webdriver.common.by import By

class Page2(Base):
    #点击登录
    login_loc = (By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a')
    def login(self):
        self.click(self.login_loc)
    #断言会员登录
    dy1_loc = (By.CLASS_NAME,'reg-new')
    def dy1(self):
      return  self.text(self.dy1_loc)
    #输入用户名
    username_loc = (By.NAME,'username')
    def username(self,username):
        self.send_keys(self.username_loc,username)
    #输入密码
    password_loc = (By.NAME, 'password')
    def password(self,password):
        self.send_keys(self.password_loc, password)
    #点击登录按钮
    loginbuttn_loc = (By.CSS_SELECTOR,'.finish-btn')
    def loginbuttn(self):
        self.click(self.loginbuttn_loc)

